<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<style>
    * {
        margin: 0;
        padding: 0;
    }

    /* .father {
        width: 500px;
        height: 500px;
        position: relative;
    } */

    .son {
        width: 200px;
        height: 100px;
        border: 1px solid gray;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -50px;
        margin-left: -100px;
    }
</style>
</head>

<body>
<div class="father">
    <div class="son">666</div>
</div>
</body>
</html>